// 初识别rxjs

import { Observable } from "rxjs";
// 被观察者（可观察者（））
const observable = new Observable((subscriber) => {
  subscriber.next(1);
  subscriber.next(2);
  subscriber.next(3);
  subscriber.complete();
});
// 观察者 observer
const observer = {
  next: (value) => {
    console.log("next value", value);
  },
  error: (err) => {
    console.log("error value", err);
  },
  complete: () => {
    console.log("complete value");
  },
};
console.log(111);

observable.subscribe(observer);
